FMeinicke's Wiki

Home

❯

Windows

❯

Powershell

❯

Unix `cut` equivalent

Unix `cut` equivalent

May 27, 20251 min read

  • pwsh/foreach-object
  • pwsh/split
  • pwsh/tostring

foreach-object split tostring

Source

  • https://stackoverflow.com/a/24634448/12780516
Get-Content filename | ForEach-Object { $_.Split(" ")[1] }

($_ might not be a string, in which case it needs to be converted to one using $_.toString())


Graph View

Created with Quartz v4.5.0 © 2025

  • GitHub